const size = 375;
function fontRem() {
}
fontRem.install = function () {
  window.onload = ()=>getRem(size, 100)
  window.onresize = ()=>getRem(size, 100)
  function getRem(pwidth, prem) {
    var html = document.getElementsByTagName("html")[0];
    var oWidth = document.body.clientWidth || document.documentElement.clientWidth;
    html.style.fontSize = oWidth / pwidth * prem + "px";
  }
}
export default fontRem

// 320 是 屏幕分辨率 
// 1px == .01rem
// Vue使用方式 Vue.use(fontRem)